import { check } from 'meteor/check';
import { Feedbacks } from '/imports/models/Feedbacks';

Meteor.methods({
  feedback(options) {
    check(options.details.text, String);

    return Feedbacks.insert({
      userId: Meteor.userId(),
      details: {
        text: options.details.text
      }
    });
  }
});